package org.syncsoft.overalt.gui.impl.componentPlugin;

import java.util.ArrayList;
import java.util.Collection;

import org.syncsoft.overalt.common.api.Resource;
import org.syncsoft.overalt.domain.user.entity.User;
import org.syncsoft.overalt.gui.api.componentPlugin.AbstractEntityTableComponentPlugin;
import org.syncsoft.overalt.gui.impl.tableDataModel.UserTableDataModel;

/**
 * 
 * @author tptfc
 *
 */
public class TableUserComponentPlugin extends AbstractEntityTableComponentPlugin<UserTableDataModel, User> {
	/*
	 * (non-Javadoc)
	 * @see org.syncsoft.overalt.gui.swing.api.AbstractTableComponentPlugin#createCoumnsName()
	 */
	@Override
	protected Collection<String> createCoumnsName() {
		Collection<String> columnsName = new ArrayList<String>();
		columnsName.add("");
		columnsName.add(Resource.getProperty("overalt.label.name"));
		
		return columnsName;
	}

	/*
	 * (non-Javadoc)
	 * @see org.syncsoft.overalt.gui.swing.api.AbstractTableComponentPlugin#newEntityTableDataModel(java.util.Collection, java.util.Collection, java.util.Collection, java.util.Collection)
	 */
	@Override
	protected UserTableDataModel newEntityTableDataModel(Collection<String> columnsName, Collection<User> entities, Collection<User> selectedEntities, Collection<User> requiredEntities) {
		return new UserTableDataModel(columnsName, entities, selectedEntities, requiredEntities);
	}
}
